import request from '@/utils/request'

// 创建计划数据
export function createProPlan(data) {
  return request({
    url: '/water/pro-plan/create',
    method: 'post',
    data: data
  })
}

// 更新计划数据
export function updateProPlan(data) {
  return request({
    url: '/water/pro-plan/update',
    method: 'put',
    data: data
  })
}

// 删除计划数据
export function deleteProPlan(id) {
  return request({
    url: '/water/pro-plan/delete?id=' + id,
    method: 'delete'
  })
}

// 获得计划数据
export function getProPlan(id) {
  return request({
    url: '/water/pro-plan/get?id=' + id,
    method: 'get'
  })
}

// 获得计划数据分页
export function getProPlanPage(query) {
  return request({
    url: '/water/pro-plan/page',
    method: 'get',
    params: query
  })
}

// 导出计划数据 Excel
export function exportProPlanExcel(query) {
  return request({
    url: '/water/pro-plan/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
